<?php
// +----------------------------------------------------------------------
// | Iecms [ Make the most exquisite CMS ]
// +----------------------------------------------------------------------
// | Copyright (c) 2009~2019 http://www.iemoo.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: iemoo <i@iemoo.com>
// +----------------------------------------------------------------------
// | DateTime: 2019/11/19 11:08
// +----------------------------------------------------------------------
namespace app\index\controller;

use app\BaseController;

use app\common\model\Member as MemberModel;
use app\common\model\SystemItem as SystemItemModel;

use think\facade\Session;
use think\facade\View;

/**
 * 后台公用基础控制器
 * Class Base
 * @package app\admin\controller
 */
class Base extends BaseController
{
	
	/**
     * 构造方法
     * @access public
     * @param  App  $app  应用对象
     */
    public function __construct()
    {
		$this->baseInfo();
    }

    /**
     * 获取基本信息
     * @return bool
     */
    protected function baseInfo()
    {
		$website_info = SystemItemModel::where('system_group_id',1)->column('value','field');

		$member_info = [];

		if(Session::has('member')){
			$member_info = MemberModel::find(Session::get('member.id'));
		}

		View::assign('website_info',$website_info);
		View::assign('member_info',$member_info);
		
    }

   


}